//
//  NSString+ListenNums.m
//  CoolFM
//
//  Created by 曹曹 on 16/9/8.
//  Copyright © 2016年 曹曹. All rights reserved.
//

#import "NSString+ListenNums.h"

@implementation NSString (ListenNums)

+ (NSString *)listenNumStringWithInteger:(NSInteger)integer {
    if (integer > 999) {
        NSInteger single = integer / 10000;
        NSInteger deciml = integer % 10000 / 1000;
        NSString *num = [NSString stringWithFormat:@"%ld.%ld万", single, deciml];
        return num;
    } else {
        return [NSString stringWithFormat:@"%ld", integer];
    }
}

@end
